<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>添加</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="../../../../lib/include.js"></script>
    <link rel="stylesheet" href="../../../../../../public-tools/pc/plugins/bootstrap-fileinput/css/fileinput.min.css">
    <link rel="stylesheet"
          href="../../../../../../public-tools/pc/plugins/bootstrap-select-1.12.4/css/bootstrap-select.min.css">

    <style>
        .form-control {
            margin-bottom: 8px;
        }

        .form-control:focus,
        .single-line:focus {
            border-color: #0e9aef !important;
        }

        .radio-inline {
            line-height: 5px;
        }

        .dropdown-menu.inner {
            background-color: #1ab394;
            color: white;
        }

        .dropdown-menu.open {
            border-radius: 5px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content" id="app" v-cloak>

    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <div id="Form" autocomplete="off">
                <div style="padding: 0">
                    <!--学生基本信息-->
                    <div class="col-sm-12 form-group">
                        <div class="col-sm-8 form-group">
                            <label class="form-inline">学生名字</label>
                            <input type="text" class="form-control" v-model="entity.student.name" placeholder="请输入学生名字">
                        </div>
                        <!--<div class="col-sm-4 form-group">
                            <label class="form-inline">学生昵称</label>
                            <input type="text" class="form-control" v-model="entity.student.nickName" placeholder="请输入学生昵称">
                        </div>-->
                        <div class="col-sm-4 form-group">
                            <label class="form-inline">学生性别</label>
                            <div>
                                <select class="form-control" v-model="entity.student.sex" >
                                    <option value="男">男</option>
                                    <option value="女">女</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <!--<div class="col-sm-12 form-group">
                        <div class="col-sm-6 form-group">
                            <label class="form-inline">微信关联电话（可为空）</label>
                            <input type="text" class="form-control" v-model="entity.student.wxTel"
                                   placeholder="请输入微信关联电话">
                        </div>
                        <div class="col-sm-6 form-group">
                            <label class="form-inline">常用电话（可为空）</label>
                            <input type="text" class="form-control" v-model="entity.student.phone"
                                   placeholder="请输入常用电话">
                        </div>
                    </div>-->

                    <!--学生课程信息-->
                    <div class="item-form" v-for="(item,i) in entity.studentClassList">
                        <div class="col-sm-12 form-group apply-item">
                            <div class="panel panel-success">
                                <div class="panel-heading">
                                    学生课程信息
                                    <!--<div class="panel-close" style="float: right;cursor: pointer" onclick="removeSelf();">X</div>-->
                                </div>
                                <div class="panel-body">
                                    <div class="col-sm-12 form-group">
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">选择班级（请先完善班级信息后选择）</label>
                                            <select class="form-control course" v-model="item.classId" @change="selectCourse(i)">
                                                <option v-for="course in selects" :value="course.id">{{course.name}}</option>
                                            </select>
                                        </div>
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">选择规格</label>
                                            <select class="form-control spec" v-model="item.saleId" :data-index="i" @change="selectSpec(i)">
<!--                                                <option v-for="spec in specList" :value="spec.id">{{spec.name}}/{{spec.unitName}} 共{{spec.lessonNum}}节课</option>-->
                                            </select>
                                        </div>
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">学费金额</label>
                                            <input class="form-control price" min="0" v-model="item.price" type="number" :data-index="i"
                                                   placeholder="请输入费用">
                                        </div>
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">剩余课时</label>
                                            <input class="form-control nowAmount" autocomplete="off" type="number" min="1" v-model="item.nowAmount" :data-index="i"
                                                   placeholder="请输入剩余课时">
                                        </div>
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">所有课时</label>
                                            <input class="form-control allAmount" autocomplete="off" type="number" min="1" v-model="item.allAmount" :data-index="i"
                                                   placeholder="请输入所有课时">
                                        </div>
                                    </div>
                                </div>
                                <div style="text-align: center">
                                    <a class="btn btn-success" @click="addOneClass(i)" style="width: 10%;">
                                        <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>添加一项</a>
                                    <a class="btn btn-danger" @click="removeOneClass(i)" style="width: 10%;">
                                        <i class="glyphicon glyphicon-minus" aria-hidden="true"></i>删除本项</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--学生家长信息-->
                    <div class="item-form" v-for="(item,i) in entity.parentEnterVoList">
                        <div class="col-sm-12 form-group apply-item">
                            <div class="panel panel-primary">
                                <div class="panel-heading">
                                    学生家长信息
                                    <!--<div class="panel-close" style="float: right;cursor: pointer" onclick="removeSelf();">X</div>-->
                                </div>
                                <div class="panel-body">
                                    <div class="col-sm-12 form-group">
                                        <div class="col-sm-8 form-group">
                                            <label class="form-inline">家长名字</label>
                                            <input type="text" class="form-control" v-model="item.parent.name"
                                                   placeholder="请输入家长名字">
                                        </div>
                                        <!--<div class="col-sm-4 form-group">
                                            <label class="form-inline">孩子对家长的称呼</label>
                                            <input type="text" class="form-control" v-model="item.parentStudent.cPCall"
                                                   placeholder="请输入孩子对家长的称呼">
                                        </div>-->
                                        <div class="col-sm-4 form-group">
                                            <label class="form-inline">是否是主联系人</label>
                                            <select class="form-control" v-model="item.parentStudent.isMain">
                                                <option value="1">是</option>
                                                <option value="0">否</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 form-group">
                                        <div class="col-sm-6 form-group">
                                            <label class="form-inline">微信关联电话</label>
                                            <input type="text" class="form-control" v-model="item.parent.wxTel"
                                                   placeholder="请输入微信关联电话">
                                        </div>
                                        <div class="col-sm-6 form-group">
                                            <label class="form-inline">常用电话（不能为空）</label>
                                            <input type="text" class="form-control" v-model="item.parent.phone"
                                                   placeholder="请输入常用电话">
                                        </div>
                                    </div>
                                </div>
                                <div style="text-align: center">
                                    <a class="btn btn-success" @click="addOneRelation(i)" style="width: 10%;">
                                        <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>添加一项</a>
                                    <a class="btn btn-danger" @click="removeOneRelation(i)" style="width: 10%;">
                                        <i class="glyphicon glyphicon-minus" aria-hidden="true"></i>删除本项</a>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

                <div style="text-align: center">
                    <a class="btn btn-default" href="javascript:parent.layer.closeAll();" style="width: 10%;">关 闭</a>
                    <button class="btn btn-primary" @click="save()" style="width: 10%;">保 存</button>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../../../../../../public-tools/pc/plugins/wangEditor/wangEditor-video.js"></script>
<script src="../../../../../../public-tools/pc/plugins/bootstrap-fileinput/js/fileinput.js"></script>
<script src="../../../../../../public-tools/pc/plugins/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
<script src="../../../../js/teach-manage/parent-student/enter/edit.js"></script>
</body>
</html>
